/*
**********************************************************************
* This code and its derivatives belong to FDM Group PLC and may not be
* copied,reproduced, amended or used in any way without permission
* from FDM group PLC
**********************************************************************
* Current Version
* ===============
* Revision: v1.0
* Date/time: 16 Jan 2007
**********************************************************************
*/
package com.fdm.model;

import java.util.List;

import com.fdm.model.exceptions.BankManagerException;

public class BankManager implements _BankManager
{	
	public BankAccountOutputVO ViewAccountSummary(String accountNumber) 
		throws BankManagerException
	{
		return new BankModelAdapter().viewAccountSummary(accountNumber);
	}

	public BankAccountOutputVO closeAcount(String accountNumber) throws BankManagerException
	{
		return new BankModelAdapter().closeAccount(accountNumber);
	}

	public BankAccountOutputVO createNewCurrentAccount(String name,
			double amount, double overdraftLimit) throws BankManagerException
	{
		
		return new BankModelAdapter().createNewAccount("CURRENT", name, amount, overdraftLimit);
	}

	public BankAccountOutputVO createNewSavingsAccount(String name,
			double amount) throws BankManagerException
	{
		return new BankModelAdapter().createNewAccount("SAVINGS", name, amount, 0);
	}

	public List<BankAccountOutputVO> listAllAccounts() throws BankManagerException
	{
		return new BankModelAdapter().listAllAccounts();
	}

	public BankAccountOutputVO makeDeposit(String accountNumber,
			double amount) throws BankManagerException
	{
		return new BankModelAdapter().deposit(accountNumber, amount);
	}

	public BankAccountOutputVO makeWithdrawal(String accountNumber,
			double amount) throws BankManagerException
	{
		return new BankModelAdapter().withdraw(accountNumber, amount);
	}

}


